

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>layuiAdmin 主页示例模板二</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all">
  <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all">
</head>
<body>

  <div class="layui-fluid">
    <div class="layui-row layui-col-space15">
      
      <div class="layui-col-sm6 layui-col-md3">
        <div class="layui-card">
          <div class="layui-card-header">
            访问量
            <span class="layui-badge layui-bg-blue layuiadmin-badge">最近一分钟</span>
          </div>
          <div class="layui-card-body layuiadmin-card-list">
            <p class="layuiadmin-big-font" id="minCount">-</p>
            <p>-
              <span class="layuiadmin-span-color">刷新 <i class="layui-inline layui-icon layui-icon-flag"></i></span>
            </p>
          </div>
        </div>
      </div>
      <div class="layui-col-sm6 layui-col-md3">
        <div class="layui-card">
          <div class="layui-card-header">
            访问量
            <span class="layui-badge layui-bg-cyan layuiadmin-badge">最近一小时</span>
          </div>
          <div class="layui-card-body layuiadmin-card-list">
            <p class="layuiadmin-big-font"id="hourCount">-</p>
            <p>
              -
              <span class="layuiadmin-span-color">刷新 <i class="layui-inline layui-icon layui-icon-face-smile-b"></i></span>
            </p>
          </div>
        </div>
      </div>
      <div class="layui-col-sm6 layui-col-md3">
        <div class="layui-card">
          <div class="layui-card-header">
            访问量
            <span class="layui-badge layui-bg-green layuiadmin-badge">本日</span>
          </div>
          <div class="layui-card-body layuiadmin-card-list">

            <p class="layuiadmin-big-font" id="dayCount">-</p>
            <p>-
              <span class="layuiadmin-span-color">刷新 <i class="layui-inline layui-icon layui-icon-dollar"></i></span>
            </p>
          </div>
        </div>
      </div>
      <div class="layui-col-sm6 layui-col-md3">
        <div class="layui-card">
          <div class="layui-card-header">
            总访问量
            <span class="layui-badge layui-bg-orange layuiadmin-badge">本月</span>
          </div>
          <div class="layui-card-body layuiadmin-card-list">

            <p class="layuiadmin-big-font" id="monCount">-</p>
            <p>-
              <span class="layuiadmin-span-color">刷新 <i class="layui-inline layui-icon layui-icon-user"></i></span>
            </p>
          </div>
        </div>
      </div>   
      <div class="layui-col-sm12">
        <div class="layui-card" style="height: 410px;">
          <div class="layui-card-header">
            访问量
            <div class="layui-btn-group layuiadmin-btn-group">
              <a href="javascript:;" class="layui-btn layui-btn-primary layui-btn-xs">去年</a>
              <a href="javascript:;" class="layui-btn layui-btn-primary layui-btn-xs">今年</a>
            </div>
          </div>


          <div class="layui-card-body">
            <div class="layui-row">
              <form class="layui-form" action="javascript:void(0);" onsubmit="return false;">
              <div class="layui-col-sm8">
                  <div class="layui-carousel layadmin-carousel layadmin-dataview" data-anim="fade" lay-filter="LAY-index-pagetwo">

                    <div class="layui-form-item">
                      <div class="layui-inline">
                        <label class="layui-form-label">接口名称</label>
                        <div class="layui-input-inline">
                          <input type="text" id="interfaceName" name="interfaceName"  autocomplete="off" class="layui-input">
                        </div>
                      </div>

                      <div class="layui-inline">
                        <label class="layui-form-label">日期</label>
                        <div class="layui-input-inline">
                          <input type="text" class="layui-input" id="test-laydate-type-datetime" placeholder="yyyy-MM-dd HH:mm:ss" lay-key="7">
                        </div>
                      </div>
                      <div class="layui-inline">-</div>
                      <div class="layui-inline">
                        <div class="layui-input-inline">
                          <input type="text" class="layui-input" id="test-laydate-type-datetime2" placeholder="yyyy-MM-dd HH:mm:ss" lay-key="8">
                        </div>
                      </div>
                      <div class="layui-inline">
                        <div class="layui-input-inline">
                            <button type="submit" class="layui-btn" lay-submit="" lay-filter="demo1"> 立即搜索 </button>
                        </div>
                      </div>
                      <div class="layui-inline">
                        <label class="layui-form-label">自动刷新</label>
                        <div class="layui-input-block">
                          <input type="checkbox" name="close" lay-skin="switch" lay-filter="switchTest" lay-text="ON|OFF">
                        </div>
                      </div>
                    </div>

                    <div carousel-item id="LAY-index-pagetwo">
                      <div><i class="layui-icon layui-icon-loading1 layadmin-loading"></i></div>
                    </div>
                  </div>
              </div>
          </form>
              <div class="layui-col-sm4">
                <div class="layuiadmin-card-list">
                  <p class="layuiadmin-normal-font">日访问数</p>
                  <span>同上期增长</span>
                  <div class="layui-progress layui-progress-big" lay-showPercent="yes">
                    <div class="layui-progress-bar" lay-percent="30%"></div>
                  </div>
                </div>
                <div class="layuiadmin-card-list">
                  <p class="layuiadmin-normal-font">月访问数</p>
                  <span>同上期增长</span>
                  <div class="layui-progress layui-progress-big" lay-showPercent="yes">
                    <div class="layui-progress-bar" lay-percent="20%"></div>
                  </div>
                </div>
                <div class="layuiadmin-card-list">
                  <p class="layuiadmin-normal-font">年访问数</p>
                  <span>同上期增长</span>
                  <div class="layui-progress layui-progress-big" lay-showPercent="yes">
                    <div class="layui-progress-bar" lay-percent="25%"></div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>

      <div class="layui-col-sm12">
        <div class="layui-row layui-col-space15">
          <div class="layui-col-sm12">
            <div class="layui-card">
              <div class="layui-card-header">本周活跃接口列表(TOP10)</div>
              <div class="layui-card-body">
                <table class="layui-table layuiadmin-page-table" lay-skin="line">
                  <thead>
                    <tr>
                      <th>接口名称</th>
                      <th>接口path</th>
                      <th>访问次数</th>
                      <th>被拦截次数</th>
                      <th>最后访问时间</th>
                    </tr> 
                  </thead>
                  <tbody>
                    <tr>
                      <td><span class="first">查询经销商列表</span></td>
                      <td> /api/home/work/dealerlist</td>
                      <td><span>2000</span></td>
                      <td>100 </td>
                      <td><i class="layui-icon layui-icon-log"> </i><span>2022年10月12日 12:00:01</span></td>

                    </tr>
                    <tr>
                      <td><span class="second">查询经销商列表</span></td>
                      <td> /api/home/work/dealerlist</td>
                      <td><span>2000</span></td>
                      <td>100 </td>
                      <td><i class="layui-icon layui-icon-log"> </i><span>2022年10月12日 12:00:01</span></td>

                    </tr>
                    <tr>
                      <td><span class="third">查询经销商列表</span></td>
                      <td> /api/home/work/dealerlist</td>
                      <td><span>2000</span></td>
                      <td>100 </td>
                      <td><i class="layui-icon layui-icon-log"> </i><span>2022年10月12日 12:00:01</span></td>

                    </tr>
                    <tr>
                      <td>查询经销商列表</td>
                      <td> /api/home/work/dealerlist</td>
                      <td><span>2000</span></td>
                      <td>100 </td>
                      <td><i class="layui-icon layui-icon-log"> </i><span>2022年10月12日 12:00:01</span></td>

                    </tr>
                    <tr>
                      <td>查询经销商列表</td>
                      <td> /api/home/work/dealerlist</td>
                      <td><span>2000</span></td>
                      <td>100 </td>
                      <td><i class="layui-icon layui-icon-log"> </i><span>2022年10月12日 12:00:01</span></td>

                    </tr>

                  </tbody>
                </table>
              </div>
            </div>
          </div>

        </div>
      </div>
        
      </div>
    </div>
  </div>

  <script src="../../layuiadmin/layui/layui.js"></script>
  <script>
  layui.config({
    base: '../../layuiadmin/' //静态资源所在路径
  }).extend({
    index: 'lib/index' //主入口模块
  }).use(['index', 'sample', 'laydate', 'jquery', 'echarts'], function(){
    var laydate = layui.laydate;
    var $ = layui.$;
    //日期时间选择器
    laydate.render({
      elem: '#test-laydate-type-datetime'
      ,type: 'datetime'
    });

    laydate.render({
      elem: '#test-laydate-type-datetime2'
      ,type: 'datetime'
    });


    $.get('http://localhost:8888/index/index',function (res) {
      $('#minCount').text(res.data.minCount);
      $('#hourCount').text(res.data.hourCount);
      $('#dayCount').text(res.data.dayCount);
      $('#monCount').text(res.data.monCount);
    });

  });
  </script>
</body>
</html>